<?php 
	///////////////////////////////////////////////////////////////////////////////////////////////////
	//	ERROR
	//	WRITTEN BY: TRAVIS THORNTON
	//	12-07-2009
	//
	//	What this page does:
	//	1) Shows an error message
	//	2) If there is a error message session variable set, it will display that and unset it
	//
	////////////////////////////////////////////////////////////////////////////////////////////////////
session_start();
require_once 'php_includes.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>An Error has Occured</title>
    <link rel="stylesheet" type="text/css" href="styles.css"/>
  </head>
  <body>
	<?php writeHeader(); ?>
	<p class="message">
	<?php
		if($_SESSION['errorMessage'])//if there is a session var for the message, use is
		{
			echo $_SESSION['errorMessage'];
			unset($_SESSION['errorMessage']);//unset it
		}else{
			echo "An error has occured";//default to generic error
		}
	?>
	</p>
	<p>
	<a href="main.php">Back to Main</a>
	</p>
  </body>
</html>